import React from 'react'
import { Tabbar } from 'react-vant';
import {Outlet,NavLink} from "react-router-dom"
import {homePath} from "../../router/routerConfig"
import { Sticky,NavBar,Toast } from 'react-vant';
import { Search,FriendsO } from '@react-vant/icons';
function Home() {
  return (
    <div>
      <Sticky >

      <header>
      <NavBar
      title="百度小说"
      leftText=""
      onClickLeft={() => Toast('返回')}
      onClickRight={() => Toast('按钮')}
    />
      <Tabbar fixed={false}>
        {
         homePath.map((item,index)=>{
           return  <Tabbar.Item  key={index}> 
             <NavLink to={item.path}>{item.title}</NavLink>
           </Tabbar.Item>
         })
        }
     
    </Tabbar>
      </header>
      </Sticky>
      <main><Outlet></Outlet></main>
    </div>
  )
}

export default Home